package com.peanut.mapper;

import com.orm.annotation.Select;
import com.orm.mapper.BaseMapper;
import com.peanut.entity.ChannelType;
import com.peanut.entity.Game;

import java.util.List;

public interface GameMapper extends BaseMapper<Game> {
	
	// 查询正常状态的游戏
	@Select("select * from game where status = 1 limit #{offset},#{length}")
	List<Game> queryNormalGame(int offset, int length);
	
	
	// 根据平台类型  分页查询
	@Select("select * from game where status = 1 and rect_type = #{platform}  limit #{offset},#{length}")
	List<Game> queryNormalGameByRectType(int offset, int length, int platform);
	
	@Select("select count(1) from game where status = 1 and rect_type = #{platform}")
	int countNormalGameByRectType(int platform);
}
